import http from './http/index';

export function apiGetDriverPage(data: any) {
  return http({
    method: 'POST',
    url: '/api/driverManage/record/page',
    data,
  });
}

export function apiGetSpaceDriverList(data: any) {
  return http({
    method: 'GET',
    url: `/api/driverManage/record/list/${data.id}`,
    params: data,
  });
}

export function apiDelDriver(data: any) {
  return http({
    method: 'GET',
    url: `/api/driverManage/record/delete/${data.driver_id}`,
  });
}

export function apiAddDriver(data: any) {
  return http({
    method: 'POST',
    url: `/api/driverManage/record/create`,
    data,
  });
}

export function apiEditDriver(data: any) {
  return http({
    method: 'POST',
    url: `/api/driverManage/record/update`,
    data,
  });
}

export function apiGetDriverDetail(data: any) {
  return http({
    method: 'GET',
    url: `/api/driverManage/record/get/${data.id}`,
  });
}

export function apiGetNewOrderList(data: any) {
  return http({
    method: 'POST',
    url: `/api/driverManage/record/getNewOrderList/`,
    data,
  });
}

export function apiGetDriverPannel(data?: any) {
  return http({
    method: 'POST',
    url: '/api/driverManage/record/orderList',
    data,
  });
}
